#include<iostream>
#include<regex>
#include<string>
using namespace std;
class B{
private:
	int age;
	string name;
public:
	void setName(string n){
		name=n;
//		this++;
	}
	 void pri() const{
		cout<<"this is class B!"<<endl;
	}
};
class A{
private:
	int a;
	int b;
public:
	A(int a,int b){
		this->a=a;
		this->b=b;
	}
	A(){}
	void print(){
		cout<<"a,b的值是："<<a<<","<<b<<endl;
	}
	int getA(){
		return this->a;
	}
	int getB(){
		return this->b;
	}

	A operator+(const A &a1){
		A aa(a1.a+this->a,a1.b+this->b);
		return aa;
	}
	A* operator*(){
		return this;
	}
	friend A operator-(const A &x,const A &y);
};

A operator-(const A &x,const A &y){
//	x.print();
	return A(x.a-y.a,x.b-y.b);
}

int main28(){
	A aa(11,22);
	A bb(22,33);
	(aa+bb).print();
	A cc=bb-aa;
	cc.print();
	A &re_cc=aa;

	B b;
	 B const &re_b=b;
	re_b.pri();

	cout<<"================"<<endl;

	B b11,*p_b11;
	p_b11=&b11;
	cout<<p_b11<<endl;
	b11.setName("北京欢迎你");
	cout<<&b11<<endl;
	cout<<"-------------------"<<endl;

	string str="http://www.baidu.com\\";
	cout<<str<<endl;
	return 0;
}
